package com.liang.threaddemo6;


public class Demo {
    public static void main(String[] args) {

        /*MyThread mr1 = new MyThread();
        MyThread mr2 = new MyThread();
        mr1.setName("窗口一");
        mr2.setName("窗口二");
        mr1.start();
        mr.start();*/

        /*MyRunnable1 mr = new MyRunnable1();
        Thread tr1 = new Thread(mr, "窗口一");
        Thread tr2 = new Thread(mr, "窗口二");
        tr1.start();
        tr2.start();*/

        MyRunnable2 mr = new MyRunnable2();
        Thread tr1 = new Thread(mr, "窗口一");
        Thread tr2 = new Thread(mr, "窗口二");
        tr1.start();
        tr2.start();
    }
}
